﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DataAccessTier;
using DTO;

namespace BusinessLogicTier
{
    public class NhaCupCapBUG
    {
        NhaCungCapDAO objNCC = new NhaCungCapDAO();
        public DataTable GetNCC()
        {
            return objNCC.GetAllNhaCungCap();
        }

        public bool kiemtranmanncc(string mancc)
        {
            return objNCC.kiemtratontai(mancc);
        }

        public bool Insert(NhaCungCap ncc)
        {
            return objNCC.Insert(ncc);
        }

        public bool Delete(string mancc)
        {
            return objNCC.Delete(mancc);
        }

        public bool Update(NhaCungCap ncc)
        {
            return objNCC.Update(ncc);
        }

        public DataTable GetTenHH()
        {
            return objNCC.GetAllTenHangHoa();
        }

        public DataTable GetSTTHienTai()
        {
            return objNCC.GetSTTMaKhachHang();
        }

        public DataTable GetDanhSachHH_CTHCC(string mancc)
        {
            return objNCC.GetDanhSachHH_CTHCC(mancc);
        }

        public bool InsertHH(int stt, string mancc, string mahang, string tenhang)
        {
            return objNCC.InsertTenHang(stt, mancc, mahang, tenhang);
        }

        public bool DeleteTenHang(string mancc)
        {
            return objNCC.DeleteTenHang(mancc);
        }

        public bool KiemTraTheoMa(string mancc)
        {
            return objNCC.kiemtratontaimanhacc(mancc);
        }

        public bool KiemTraTheoTenHang(string tennhacc)
        {
            return objNCC.kiemtratontaitennhacc(tennhacc);
        }

        public DataTable GetALLNhaCCTheoMa(string mancc)
        {
            return objNCC.GetAllNhaCCTheoMa(mancc);
        }

        public DataTable GetALLNhaCCTheoTen(string tennhacc)
        {
            return objNCC.GetAllNhaCCTheoTen(tennhacc);
        }
    }
}
